-- GENERATED SPELL FOR [Elder Harkek] --


function spell0_28138(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(33643,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28138', 3000, 1)
end

function spell1_28138(pUnit, Event) --@Thunderbolt,n/a--
pUnit:FullCastSpellOnTarget(52905,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_28138', 3000, 1)
end

function Sorts_28138(pUnit, Event)
local choix_sorts_28138 = math.random(0, 1)
if choix_sorts_28138 == 0 then
pUnit:RegisterEvent('spell0_28138', 1, 1)
end
if choix_sorts_28138 == 1 then
pUnit:RegisterEvent('spell1_28138', 1, 1)
end
end

function mob28138_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_28138', math.random(1500, 3000), 1)
end

function mob28138_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28138_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob28138_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(28138, 1, 'mob28138_Action')
RegisterUnitEvent(28138, 2, 'mob28138_Leave')
RegisterUnitEvent(28138, 3, 'mob28138_Kill')
RegisterUnitEvent(28138, 4, 'mob28138_Die')
